﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DormMS.Model;
using DormMS.Model.SearchModels;
using DormMS.Model.ViewModels;

namespace DormMS.IService
{
     public interface ICouponService
    {
        Coupon FindCoupon(int id);

        bool EditCoupon(Coupon model);

        int AddCoupon(Coupon model);

        List<V_Coupon> GetCouponList(BaseSearchModel search, ref int total);
        /// <summary>
        /// 获取可领取的优惠券列表
        /// </summary>
        /// <returns></returns>
        List<V_Coupon> GetCouponList();

        List<V_MemberCoupon> GetCouponDetailList(MemberCouponSearch search, ref int total);
        V_Coupon GetCouponInfo(int id);

        V_MemberCoupon GetMemberCouponInfoById(int id);

        /// <summary>
        /// 我的优惠券
        /// </summary>
        /// <param name="memberId">会员Id</param>
        /// <param name="status">1.已使用，2.可用，3.过期，0全部</param>
        /// <returns></returns>
        List<V_Coupon> GetMyCouponList(int memberId, int status);

        /// <summary>
        /// 订单提交页获取可用优惠券
        /// </summary>
        /// <param name="memberId">会员Id</param>
        /// <param name="max">价格</param>
        /// <param name="cids">分类ID集合</param>
        /// <returns></returns>
        List<V_Coupon> GetMyCouponList(int memberId, decimal price, string cids);

        int GetMyCouponCount(int memberId);

        void DelCoupon(int id);

        void ReceiveCoupon(int couponId, int memberId);
    }
}
